-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 'view by school' distribution graph #864
Merged
Merged
+6
−3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kellyel
force-pushed
the
fix/school-graphs
branch
from
October 10, 2024 16:11
60641a0
to
758473e
Compare
Visit the preview URL for this PR (updated for commit abb28a6): https://roar-staging--pr864-fix-school-graphs-96lw3meh.web.app (expires Wed, 23 Oct 2024 20:34:27 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 2631e9c58fd0104ecbfddd72a62245ddac467460 |
roar-dashboard-e2e Run #8479
Run Properties:
|
Project |
roar-dashboard-e2e
|
Run status |
Passed #8479
|
Run duration | 02m 30s |
Commit |
abb28a66b1: Component Tests for PR 864 "Fix 'view by school' distribution graph" from commit...
|
Committer | Elijah Kelly |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
17
|
ksmontville
reviewed
Oct 10, 2024
richford
requested changes
Oct 11, 2024
Emily-ejag
approved these changes
Oct 15, 2024
richford
approved these changes
Oct 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
The issue: unenrolled students will not have a schoolId in their schools.current array. Therefore, when viewing the distribution graph by school, it will attempt to organize by a field in which some students have undefined as a value.
The solution here is to cross reference a student's schools.all and the assignment's assigningOrgs.schools to find the school that the user was a member of when it was assigned. If that fails, we fallback to '0 Unknown School' to prevent the graph from failing catastrophically.Rather than doing the cross-referencing on the front end, we will utilize the assignment doc's
assigningOrgs
object which is already an intersection of the administration's assigning orgs and the user's orgs at the time of assignment. This is much more efficient and eliminates the possibility of a user being listed under the wrong school.Types of changes
What types of changes does this pull request introduce?
Checklist
Justification of missing checklist items
Further comments